package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author zhangyy
 * @since 2020-06-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_stock_history_detail")
public class StockHistoryDetailDo extends Model<StockHistoryDetailDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("shop_id")
    private Long shopId;

    @TableField("product_info_id")
    private Long productInfoId;

    @TableField("storage_id")
    private Long storageId;

    @TableField("can_sell")
    private int canSell;

    @TableField("freeze_count")
    private int freezeCount;

    @TableField("repairing_count")
    private int repairingCount;

    @TableField("canot_sell")
    private int canotSell;

    @TableField("company_id")
    private Long companyId;

    /**
     * 库存花费
     */
    @TableField("cost")
    private double cost;

    /**
     * 一档数量
     */
    @TableField("v1_count")
    private int v1Count;
    /**
     * 二档数量
     */
    @TableField("v2_count")
    private int v2Count;
    /**
     * 三档数量
     */
    @TableField("v3_count")
    private int v3Count;

    /**
     * 7天免租数量
     */
    @TableField("v4_count")
    private int v4Count;


    /**
     * 创建日期
     */
    @TableField("create_date")
    private Date createDate;

    @TableField("delete_flag")
//    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
